<include file="Public:header" />
<load href="__JS__/upload/uploadify.css" />
<load href="__JS__/swfobject.js" />
<script type="text/javascript" src="__JS__/jquery.uploadify.v2.1.4.min.js"></script> 
<script type="text/javascript" src="__JS__/jianfanzhuanhuan.js"></script>
<div class="content">
<!-----------------------------------------内容开始--------------------------------------------------->
<div class="infoBox">
<form name="form" action="{:U('doarea')}" method="post" onsubmit="return checkform();">
<input type="hidden" name="id" value="{$id}" />


<table width="100%" border="0" cellpadding="0" cellspacing="0" id="basic">
<tr>
<td width="11%" class="infoBoxTd">区域名称：</td>
<td colspan="2"><input type="text" name="name" value="{$name}" style="float:left;margin-right:10px;" /> <a href="javascript:;" onclick="zhuanjft(this)" class="buttom"  >自动转换简繁体</a>
</td>
</tr>

<volist name="lang" id="lang">
<tr>
<td width="11%" class="infoBoxTd">区域名称（<span class="lang_name" lang_daihao="{$lang.nid}">{$lang.name}</span>）：</td>
<td colspan="2">
<input type="text" name="name{$lang.id}" value="{$lang.menu_name}" style="float:left;margin-right:10px;" />
<eq name="lang.nid" value="L01"> <a href="javascript:;" onclick="zhuanft(this)" class="buttom"  >将简体转换为繁体</a></eq>
</td>
</tr>
</volist>


<tr>
	<td class="infoBoxTd">图片：</td>
	<td>
		<img id="url" src="<neq name='url' value=''>{$url}<else/>__PUBLIC__/images/nopic.gif</neq>" width="480" height="170" style="float:left;margin-right:20px;" />
		<div class="upimg-box"><div id="fileQueue"></div>
		<input id="file_upload_url" type="file" /><input name="url" type="hidden" value="{$url}" /></div>
	</td>
</tr>

<tr>
	<td class="infoBoxTd">简介：</td>
	<td colspan="2">
	<textarea id="intro" name="intro" style="width:600px;height:100px;" >{$intro}</textarea>
	<br />
	<a href="javascript:;" onclick="zhuanjft(this)" class="buttom"  >自动转换简繁体</a>
	</td>
</tr>

<volist name="lang_intro" id="lang_intro">
<tr>
<td width="11%" class="infoBoxTd">简介（<span class="lang_name" lang_daihao="{$lang_intro.nid}">{$lang_intro.name}</span>）：</td>
<td colspan="2">
<textarea id="intro{$lang_intro.id}" name="intro{$lang_intro.id}" style="width:600px;height:100px;" >{$lang_intro.menu_intro}</textarea>
<br />
<eq name="lang_intro.nid" value="L01"> <a href="javascript:;" onclick="zhuanft(this)" class="buttom"  >将简体转换为繁体</a></eq>
</td>
</tr>
</volist>


<tr>
<td width="11%" class="infoBoxTd">代号：</td>
<td colspan="2"><input type="text" name="nid" value="{$nid}"  />
</td>
</tr>

<tr>
<td width="11%" class="infoBoxTd">是否热门地点：</td>
<td colspan="2"><input type="radio" name="hot" value="0" <eq name="hot" value="0"> checked="checked"</eq> /> 否 <input type="radio" name="hot" value="1" <eq name="hot" value="1"> checked="checked"</eq>/> 是
</td>
</tr>

<tr>
<td width="11%" class="infoBoxTd">排序：</td>
<td colspan="2"><input type="text" name="xu" value="{$xu}" />
</td>
</tr>

</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="infoBoxTd">&nbsp;</td>
<td align="left"><input type="submit" name="Button1" value="保存" class="formInput01" /></td>
</tr>
</table>
</form>
</div>
<!-----------------------------------------内容结束--------------------------------------------------->
</div>
<script language="javascript">

//表单验证
function checkform(){
	var b = $('input[name="name"]').val();
	if(b == ''){
		ui.error('请输入区域');
		return false;
	}
	var n = $('input[name="nid"]').val();
	if(n == ''){
		ui.error('请输入代号');
		return false;
	}
	if(/^[A-Za-z0-9_-]+$/.test(n)==0) {
		ui.error('代号只能输入英文字母和数字');
		return false;
	}

}
//图片上传
$("#file_upload_url").uploadify({
		'uploader'       : '__JS__/swf/uploadify.swf',
		'script'         : '__JS__/upload/uploadify.php',
		'cancelImg'      : '__JS__/upload/cancel.png',
		'folder'         : 'data/area_url',
		'queueID'        : 'fileQueue',
		'sizeLimit'      :	2 * 1000 * 1024,
		'fileExt'        : '*.jpg;*.gif;*.png;', //允许文件上传类型,和fileDesc一起使用.
		'fileDesc'       : '*.jpg;*.gif;*.png;',  //选择文件对话框中的提示文本.
		'auto'           : true,
		'multi'          : false,	
		'onComplete':function(event,queueId,fileObj,response,data){
			$('input[name="url"]').val(response);
			$('#url').attr('src', response);
		}
});

</script>
    

<include file="Public:footer" />
